home *** CD-ROM | disk | FTP | other *** search
/ Pascal Super Library / Pascal Super Library (CW International)(1997).bin / LIBRARY / FUTILS / XWIN.DOC < prev    next >
Text File  |  1989-02-22  |  2KB  |  85 lines

  1.                              /\ RKCP /\
  2.                              \/ RKCP \/
  3.  
  4. *******************************************************************
  5. ************************* XWIN by Rex Kerr ************************
  6. ************************ Copyright (C) 1989 ***********************
  7. *******************************************************************
  8.  
  9.    Have you read the documentation for FWIN?  If not, I suggest you
  10. do.  This is not "full" documentation; it is meant to explain where
  11. XWIN is different from FWIN, so you can choose when to use both.
  12.  
  13.    XWIN is slower that FWIN, but it doesn't leave behind images of
  14. non-existant windows.  XWIN also keeps memory required to a minimum
  15. whereas FWIN just has a fixed buffer for each window.
  16.  
  17. ***
  18.  
  19. XWIN has added this type :
  20.  
  21. type Win_ScrBuf = array[1..4000] of byte;
  22.  
  23. And changed one line and added another in winptr.  The changed line
  24. went from
  25.  
  26. WScreen : Vram_ScrBuf;
  27.  
  28. to
  29.  
  30. WScreen : ^Win_ScrBuf;
  31.  
  32. and the new line is
  33.  
  34. ScrSize : word;
  35.  
  36. ScrSize holds the size of WScreen (WScreen is GETMEMed and FREEMEMed)
  37. in bytes.
  38.  
  39. ***
  40.  
  41. GetWinVram(var Scrn : Win_ScrBuf; x,y,w,h : byte);
  42.  
  43. This gets the screen window X,Y,W,H and places the contents in Scrn.
  44. Note that Scrn is assumed to be exactly the size of the memory
  45. required to hold the X,Y,W,H window.  Assuming you have x,y,w,h you
  46. can calculate the memory required like this:
  47.  
  48. mem_req := (((w - x) + 1) * ((h - y) + 1)) * 2;
  49.  
  50. Or, in other words, the number of columns high times the number of
  51. rows wide times two.
  52.  
  53. ***
  54.  
  55. PutWinVram(Scrn: Win_ScrBuf; x,y,w,h : byte);
  56.  
  57. This does the same thing as GetWinVram, except instead of reading
  58. from the screen, it writes to it.
  59.  
  60. ***
  61.  
  62. PutWinBorder(x,y,w,h : byte; st,border : string; batr : byte);
  63.  
  64. This draws a border just like CreateWindow does, except it doesn't
  65. actually create a window, it just does the drawing.
  66.  
  67. ***
  68.  
  69. XWIN does not have GetVram or PutVram.  If you use XWIN you'll have
  70. to do the full GetVramSec(Scrn,1,1,80,25,1,1).
  71.  
  72. ***
  73.  
  74. Everything else works the same as with FWIN.  You don't need that
  75. CleanUpScreen, though.
  76.  
  77. If you think I've left anything out out here, or if this is too
  78. unclear, please contact me via CompuServe on either EasyPlex or
  79. the TP5 message section of BPROGA.
  80.  
  81. Rex Kerr  71550,3147
  82.  
  83.                              /\ RKCP /\
  84.                              \/ RKCP \/
  85.